oracle.pg.text

## Class OracleIndexManager

- java.lang.Object
- - oracle.pg.text.OracleIndexManager

- Direct Known Subclasses:
    HBaseIndexManager

      public abstract class OracleIndexManager
      extends Object

  A single point for managing/accessing all vertex and edge indices of a specific `OraclePropertyGraphBase` object.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `EDGE_CLASS_ID`
    `static int` | `VERTEX_CLASS_ID`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OracleIndexManager(OraclePropertyGraphBase opg)` Creates a new OracleIndexManager object, handling external indexes associated to the specified property graph.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `clearAndCloseIndices()` Clear and close all manual and automatic indices defined for the underlying property graph.
    `void` | `clearIndices()` Clears all the data of the existing indices (manual and automatic) created on top of the underlying property graph
    `void` | `close()` Closes this index manager object.
    `void` | `closeIndices()` Closes and commits all opened indices stored in cache.
    `void` | `commitIndices()` Commits all open indices.
    `<T extends Element> boolean` | `containsIndexedKey(String key, Class<T> indexClass)` Verifies if the auto index contains the specified index key.
    `<T extends Element> OracleIndex<T>` | `createIndex(String indexName, Class<T> indexClass, OraclePropertyGraphBase pg, Parameter... indexParameters)` Generates an index with a particular name, for a particular class, and of a particular type.
    `void` | `disableEdgeAutoIndexer()` Disables the edge auto indexing.
    `void` | `disableVertexAutoIndexer()` Disables the vertex auto indexing.
    `void` | `dropAllAutoIndices()` Removes all the automatic indices created on top of the underlying property graph
    `void` | `dropAllIndices()` Drops all indices handled by this index manager.
    `void` | `dropAllManualIndices()` Removes all manual indices created on top of the underlying property graph.
    `void` | `dropIndex(String indexName)` Drops the specified manual index
    `<T extends Element> void` | `dropIndices()` Removes all manual and automatic indexes created on top of the underlying property graph.
    `void` | `enableEdgeAutoIndexer()` Enables the edge auto indexing.
    `void` | `enableVertexAutoIndexer()` Enables the vertex auto indexing.
    `boolean` | `existEdgeIndex(String indexName)` Verifies if the index with the specified name already exists for this property graph as an edge manual index.
    `boolean` | `existVertexIndex(String indexName)` Verifies if the manual vertex index with the specified name already exists for this property graph.
    `OracleAutoIndex<Edge>` | `getEdgeAutoIndexer(Parameter... indexParameters)` Gets the edge auto index associated to this property graph if enabled.
    `String` | `getEdgeAutoIndexName()` Gets the name used for the edge auto index.
    `<T extends Element> OracleIndex<T>` | `getEdgeIndex(String indexName)` Gets the edge manual index associated to the specified index name
    `static <T extends Element> int` | `getEntityTypeAsInt(Class<T> indexClass)` Gets the identifier associated to the specified index Class.
    `abstract <T extends Element> List<String>` | `getIndexedKeys(String indexName, Class<T> indexClass)` Gets all the keys associated to the specified auto index and stored in the index meta data table.
    `Iterable<Index<? extends Element>>` | `getIndices()` Gets all the manual indices managed by this index manager
    `OracleAutoIndex<Vertex>` | `getVertexAutoIndexer(Parameter... indexParameters)` Gets the vertex automatic index associated to this property graph if enabled.
    `String` | `getVertexAutoIndexName()` Gets the name used for the vertex auto index.
    `<T extends Element> OracleIndex<T>` | `getVertexIndex(String indexName)` Gets the manual vertex index associated to the specified index name
    `<T extends Element> boolean` | `indexAlreadyExists(String indexName, Class<T> indexClass)` Verifies if the index with the specified name already exists for this property graph.
    `boolean` | `isEdgeAutoIndexerEnabled()` Verifies if the edge auto indexer is enabled.
    `boolean` | `isVertexAutoIndexerEnabled()` Verifies if the vertex auto indexer is enabled.
    `void` | `remove(Object element)` Removes the specified element from all the indices handled by this OracleIndex Manager object.
    `void` | `removePropertyFromIndices(String key, Object element)` Removes the property associated to the specified element from all the indices handled by this OracleIndex Manager.
    `<T extends Element> void` | `startAutoIndexingProperties(String[] keys, Class<T> elementClass)` Adds the specified keys to the properties used for auto indexing.
    `<T extends Element> void` | `startAutoIndexingProperty(String key, Class<T> elementClass)` Adds the specified key to the properties used for auto indexing.
    `<T extends Element> void` | `stopAutoIndexingProperties(String[] keys, Class<T> elementClass)` Removes the specified keys to the properties used for auto indexing.
    `<T extends Element> void` | `stopAutoIndexingProperty(String key, Class<T> elementClass)` Removes the specified key to the properties used for auto indexing.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### EDGE_CLASS_ID

          public static final int EDGE_CLASS_ID

      See Also:
        Constant Field Values

    - #### VERTEX_CLASS_ID

          public static final int VERTEX_CLASS_ID

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### OracleIndexManager

          public OracleIndexManager(OraclePropertyGraphBase opg)

      Creates a new OracleIndexManager object, handling external indexes associated to the specified property graph.
      Parameters:
        `opg` - a `OraclePropertyGraphBase` object.

  - ### Method Detail

    - #### clearAndCloseIndices

          public final void clearAndCloseIndices()

      Clear and close all manual and automatic indices defined for the underlying property graph.

    - #### clearIndices

          public final void clearIndices()

      Clears all the data of the existing indices (manual and automatic) created on top of the underlying property graph

    - #### close

          public final void close()

      Closes this index manager object.

    - #### closeIndices

          public final void closeIndices()

      Closes and commits all opened indices stored in cache.

    - #### commitIndices

          public final void commitIndices()

      Commits all open indices.

    - #### containsIndexedKey

          public final <T extends Element> boolean containsIndexedKey(String key,
                                                       Class<T> indexClass)

      Verifies if the auto index contains the specified index key.
      Parameters:
        `key` - the key to validate.
        `indexClass` - index class
      Returns:
        true if the auto index contains the specified index key, else return false.

    - #### createIndex

          public final <T extends Element> OracleIndex<T> createIndex(String indexName,
                                                       Class<T> indexClass,
                                                       OraclePropertyGraphBase pg,
                                                       Parameter... indexParameters)

      Generates an index with a particular name, for a particular class, and of a particular type.
      Parameters:
        `indexName` - the name of the index
        `indexClass` - the element class that this index is indexing (can be base class)
        `indexParameters` - a collection of parameters for the underlying index implementation
      Returns:
        the index created

    - #### disableEdgeAutoIndexer

          public final void disableEdgeAutoIndexer()

      Disables the edge auto indexing.

    - #### disableVertexAutoIndexer

          public final void disableVertexAutoIndexer()

      Disables the vertex auto indexing.

    - #### dropAllAutoIndices

          public final void dropAllAutoIndices()

      Removes all the automatic indices created on top of the underlying property graph

    - #### dropAllIndices

          public final void dropAllIndices()

      Drops all indices handled by this index manager.

    - #### dropAllManualIndices

          public final void dropAllManualIndices()

      Removes all manual indices created on top of the underlying property graph.

    - #### dropIndex

          public final void dropIndex(String indexName)

      Drops the specified manual index
      Parameters:
        `indexName` - the name of the index to remove

    - #### dropIndices

          public final <T extends Element> void dropIndices()

      Removes all manual and automatic indexes created on top of the underlying property graph.

    - #### enableEdgeAutoIndexer

          public final void enableEdgeAutoIndexer()

      Enables the edge auto indexing.

    - #### enableVertexAutoIndexer

          public final void enableVertexAutoIndexer()

      Enables the vertex auto indexing.

    - #### existEdgeIndex

          public final boolean existEdgeIndex(String indexName)

      Verifies if the index with the specified name already exists for this property graph as an edge manual index.
      Parameters:
        `indexName` - the name of the index.
      Returns:
        true if the index already exists, else return false.

    - #### existVertexIndex

          public final boolean existVertexIndex(String indexName)

      Verifies if the manual vertex index with the specified name already exists for this property graph.
      Parameters:
        `indexName` - the name of the index.
      Returns:
        true if the index already exists, else return false.

    - #### getEdgeAutoIndexer

          public OracleAutoIndex<Edge> getEdgeAutoIndexer(Parameter... indexParameters)

      Gets the edge auto index associated to this property graph if enabled. If auto-indexing is not enabled in this property graph, then this method will return a null OracleIndex object.
      Returns:
        an `OracleAutoIndex` object

    - #### getEdgeAutoIndexName

          public final String getEdgeAutoIndexName()

      Gets the name used for the edge auto index.

    - #### getEdgeIndex

          public final <T extends Element> OracleIndex<T> getEdgeIndex(String indexName)

      Gets the edge manual index associated to the specified index name
      Parameters:
        `indexName` - the name of the index to obtain
      Returns:
        an `OracleIndex` object

    - #### getEntityTypeAsInt

          public static final <T extends Element> int getEntityTypeAsInt(Class<T> indexClass)

      Gets the identifier associated to the specified index Class.
      Parameters:
        `indexClass` - the class associated to this index (Vertex, Edge)
      Returns:
        the index class type identifier.

    - #### getIndexedKeys

          public abstract <T extends Element> List<String> getIndexedKeys(String indexName,
                                                        Class<T> indexClass)

      Gets all the keys associated to the specified auto index and stored in the index meta data table.
      Parameters:
        `indexName` - the name of the auto index.
        `indexClass` - the class associated to the index (Vertex, Edge)

    - #### getIndices

          public final Iterable<Index<? extends Element>> getIndices()

      Gets all the manual indices managed by this index manager
      Returns:
        the manual indices managed by this index manager

    - #### getVertexAutoIndexer

          public final OracleAutoIndex<Vertex> getVertexAutoIndexer(Parameter... indexParameters)

      Gets the vertex automatic index associated to this property graph if enabled. If auto-indexing is not enabled in this property graph, then this method will return a null OracleIndex object.
      Returns:
        an `OracleAutoIndex` object

    - #### getVertexAutoIndexName

          public final String getVertexAutoIndexName()

      Gets the name used for the vertex auto index.

    - #### getVertexIndex

          public final <T extends Element> OracleIndex<T> getVertexIndex(String indexName)

      Gets the manual vertex index associated to the specified index name
      Parameters:
        `indexName` - the name of the index to obtain
      Returns:
        an `OracleIndex` object

    - #### indexAlreadyExists

          public final <T extends Element> boolean indexAlreadyExists(String indexName,
                                                       Class<T> indexClass)

      Verifies if the index with the specified name already exists for this property graph.
      Parameters:
        `indexName` - the name of the index.
      Returns:
        true if the index already exists, else return false.

    - #### isEdgeAutoIndexerEnabled

          public final boolean isEdgeAutoIndexerEnabled()

      Verifies if the edge auto indexer is enabled.
      Returns:
        true if edge indexing is enabled, else return false.

    - #### isVertexAutoIndexerEnabled

          public final boolean isVertexAutoIndexerEnabled()

      Verifies if the vertex auto indexer is enabled.
      Returns:
        true if vertex indexing is enabled, else return false.

    - #### remove

          public final void remove(Object element)

      Removes the specified element from all the indices handled by this OracleIndex Manager object.
      Parameters:
        `element` - the element to remove.

    - #### removePropertyFromIndices

          public final void removePropertyFromIndices(String key,
                                       Object element)

      Removes the property associated to the specified element from all the indices handled by this OracleIndex Manager.
      Parameters:
        `key` - the key to remove
        `element` - the element where the K/V pair will be removed

    - #### startAutoIndexingProperties

          public final <T extends Element> void startAutoIndexingProperties(String[] keys,
                                                             Class<T> elementClass)

      Adds the specified keys to the properties used for auto indexing.
      Parameters:
        `keys` - the keys which will be used to generate the index
        `elementClass` - the class of the auto index.

    - #### startAutoIndexingProperty

          public final <T extends Element> void startAutoIndexingProperty(String key,
                                                           Class<T> elementClass)

      Adds the specified key to the properties used for auto indexing.
      Parameters:
        `key` - the key which will be used to generate the index
        `elementClass` - the class of the auto index.

    - #### stopAutoIndexingProperties

          public final <T extends Element> void stopAutoIndexingProperties(String[] keys,
                                                            Class<T> elementClass)

      Removes the specified keys to the properties used for auto indexing.
      Parameters:
        `keys` - an array of keys to be used to generate the index
        `elementClass` - the class of the auto index.

    - #### stopAutoIndexingProperty

          public final <T extends Element> void stopAutoIndexingProperty(String key,
                                                          Class<T> elementClass)

      Removes the specified key to the properties used for auto indexing.
      Parameters:
        `key` - the key which will be used to generate the index
        `elementClass` - the class of the auto index.

Copyright © 2015 Oracle and/or its affiliates. All Rights Reserved.